// styles in src/style directory are applied to the whole page

header.navbar {
  background: linear-gradient(135deg, #0143a3, #0273d4);
}

.masthead-followup {
  img {
    width: 64px;
    height: 64px;
  }
}

.footer {
  padding: 3rem 0;
  // margin-top: 3rem;
  font-size: 85%;
  // background-color: #f7f7f7;
  text-align: left;

  p {
    margin-bottom: 0;
  }

  a {
    font-weight: 500;
    color: #55595c;
  }
}

.social-buttons > iframe {
  margin-left: 0.75rem;
}

.sidebar-collapsed {
  margin-left: -15px;
  margin-right: -15px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.sidebar {
  position: sticky;
  top: 1rem;
}

header.title {
  margin-left: -15px;
  margin-right: -15px;
  position: relative;

  .content-tabset {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;

    .nav-link {
      border-style: solid;
      border-width: 3px 1px 1px;
      border-radius: 3px 3px 0 0;
    }

    .nav-link:not(.active):hover {
      border-color: transparent;
    }

    .active {
      border-top-color: #28a745;
    }

    .navigation-dropdown {
      cursor: pointer;

      .nav-link {
        padding-right: 0.3rem;
        line-height: 1em;
        border-color: transparent;
        background: none;
        color: #007bff;
        &:hover {
          color: #0056b3;
        }
      }

      .dropdown-toggle:after {
        display: none;
      }

      .dropdown-menu {
        border-color: #d9d9d9;
      }

      svg {
        width: 22px;
        height: 22px;
      }

      &.show {
        .nav-link {
          color: #0056b3;
        }
      }
    }
  }
}

.toc {
  margin-left: -15px;
  margin-right: -15px;

  .toc-item {
    .toc-link {
      display: block;
      padding: 0.25rem 1.5rem;
      color: rgba(0, 0, 0, 0.65);
    }

    .nav > li > a {
      font-size: 90%;

      &:hover, &:focus {
        text-decoration: none;
        color:#0275d8;
      }
    }

    .nav > li.active > a {
      font-weight: 500;
      color: rgba(0, 0, 0, 0.85);
    }

    &.active {
      margin-top: 2rem;

      > .toc-link {
        font-weight: 500;
        color: rgba(0, 0, 0, 0.85);
      }
    }
  }
}

.contextual-nav .nav {
  position: sticky;
  top: 0;

  a {
    color: inherit;
    font-size: 90%;
    padding: .25rem 1rem;
  }

  a:hover {
    color: #0275d8;
  }
}

.deprecated {
  h3 {
    text-decoration: line-through;
  }

  h5 {
    display: inline-block;
  }

  td.label-cell code,
  p.signature,
  code.selector,
  code.export-as {
    text-decoration: line-through;
  }

  .description,
  .meta,
  .lead {
    opacity: 0.5;
  }
}


div.api-doc-component, .overview {
  margin-bottom: 3rem;

  h2,
  h3 {
    .github-link {
      transition: opacity 0.5s;
      opacity: 0.3;
      margin-left: .5rem;
    }

    &:hover {
      .github-link {
        opacity: 1;
      }
      & > .title-fragment {
        opacity: 1;
      }
    }
  }

  section, ngbd-overview-section {
    margin-top: 3rem;
    h4 {
      margin-top: 2rem;
      margin-bottom: 1rem;
    }

    .meta {
      font-size: 0.8rem;
      margin-bottom: 1rem;
      > div {
        margin-bottom: 0.5rem;
      }
    }
  }
}

a.title-fragment {
  opacity: 0;
  transition: opacity 125ms ease;
  line-height: inherit;
  position: absolute;
  margin-left: -1.2em;
  padding-right: 0.5em;

  & > img {
    width: 1em;
    height: 1em;
  }
}

div.component-demo {
  margin-bottom: 3rem;
  h2 {
    display: flex;
    margin-bottom: 1rem;

    span {
      flex-grow: 1;
    }

    .stackblitz {
      display: flex;
      align-items: center;
      align-self: center;

      .stackblitz-icon {
        height: 1.2rem;
        margin-left: -0.5rem;
      }
    }
    &:hover {
      & > .title-fragment {
        opacity: 1;
      }
    }
  }

  .tabset-code {
    .nav {
      margin: 0;
      padding: 0.5rem 1.25rem 0;
      font-size: 80%;

      .nav-link.active {
        background-color: #f5f2f0;
        border-bottom: 1px solid #f5f2f0;
      }

      .nav-link:not(.active) {
        color: #999;
        &:hover {
          color: #666;
        }
      }
    }

    .tab-content {
      overflow: hidden;
    }

    pre {
      margin: 0;
    }
  }
}

.examples-legend {
  font-size: 80%;
}

ngbd-api-docs,
ngbd-api-docs-class,
ngbd-api-docs-config {
  display: block;

  &:not(:first-child) {
    margin-top: 3rem;
    border-top: 1px solid #999;
    padding-top: 1rem;
  }
}

// override prism theme background color to inline it with bootstrap colors
code[class*='language-'],
pre[class*='language-'] {
  background-color: #f5f5f5; // same as bootstrap card header
}

span.token.tag {
  font-size: 1em;
  padding: 0;
}

// Right-To-Left layout for the Islamic Calendars
ngb-datepicker.rtl {
  direction: rtl;
}

ngb-datepicker.rtl ngb-datepicker-navigation-select select.custom-select {
  background-position: left 0.25rem center;
}

ngb-datepicker.rtl .ngb-dp-arrow.right .ngb-dp-navigation-chevron {
  transform: rotate(-135deg);
  margin: 0 0 0 0.25rem;
}

ngb-datepicker.rtl .ngb-dp-navigation-chevron {
  transform: rotate(45deg);
  margin: 0 0.25rem 0 0;
}

ngb-datepicker.hebrew {

  .ngb-dp-day {
    width: 2.75rem;
    height: 2.75rem;
    line-height: 1rem;
  }

  .ngb-dp-weekday {
    width: 2.75rem;
  }
}

ngb-carousel {
  .carousel-item img {
    width: 100%;
  }
}
